package com.lvshi0797.cms.entities;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 家庭成员情况
 * 
 * @author Administrator
 *
 */

@Entity
@Table(name="f_member")
public class FMember implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	/**
	 * 姓名
	 */
	private String username;
	/**
	 * 性别
	 */
	private String gender;
	/**
	 * 文化程度
	 */
	private String education;
	/**
	 * 二代身份证号码
	 */
	private String identityCard;
	/**
	 * 从业情况
	 */
	private String workstatus;
	/**
	 * 是否户主 0表示不是，1表示是，默认为0
	 */
	private int isHuzhu;
	/**
	 * 是否享受低保 0表示不是，1表示是，默认为0
	 */
	private int isInDibao;
	/**
	 * 是否参加医疗保险 0表示不是，1表示是，默认为0
	 */
	private int isInYibao;
	/**
	 * 是否参加养老保险 0表示不是，1表示是，默认为0
	 */
	private int isInYanglao;
	/**
	 * 是否残疾 0表示不是，1表示是，默认为0
	 */
	private int isDisable;

	/**
	 * 备注
	 */
	private String memo;
	/**
	 * 残疾人主要信息关联 一对一，单向关联
	 */
	private FDisabledInfo disabledInfo;
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	@Column(length=20)
	public String getUsername() {
		return username;
	}
	@Column(length=10)
	public String getGender() {
		return gender;
	}
	@Column(length=20)
	public String getEducation() {
		return education;
	}
	@Column(length=20)
	public String getIdentityCard() {
		return identityCard;
	}
	@Column(length=20)
	public String getWorkstatus() {
		return workstatus;
	}
	public int getIsHuzhu() {
		return isHuzhu;
	}
	public int getIsInDibao() {
		return isInDibao;
	}
	public int getIsInYibao() {
		return isInYibao;
	}
	public int getIsInYanglao() {
		return isInYanglao;
	}
	public int getIsDisable() {
		return isDisable;
	}
	@Column(length=120)
	public String getMemo() {
		return memo;
	}
	@OneToOne(cascade={CascadeType.REMOVE,CascadeType.MERGE})
	@JoinColumn(name="disaCard",nullable=true)
	public FDisabledInfo getDisabledInfo() {
		return disabledInfo;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public void setEducation(String education) {
		this.education = education;
	}
	public void setIdentityCard(String identityCard) {
		this.identityCard = identityCard;
	}
	public void setWorkstatus(String workstatus) {
		this.workstatus = workstatus;
	}
	public void setIsHuzhu(int isHuzhu) {
		this.isHuzhu = isHuzhu;
	}
	public void setIsInDibao(int isInDibao) {
		this.isInDibao = isInDibao;
	}
	public void setIsInYibao(int isInYibao) {
		this.isInYibao = isInYibao;
	}
	public void setIsInYanglao(int isInYanglao) {
		this.isInYanglao = isInYanglao;
	}
	public void setIsDisable(int isDisable) {
		this.isDisable = isDisable;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public void setDisabledInfo(FDisabledInfo disabledInfo) {
		this.disabledInfo = disabledInfo;
	}
	public FMember() {
		super();
		// TODO Auto-generated constructor stub
	}
	public FMember(String username, String gender, String education,
			String identityCard, String workstatus, int isHuzhu, int isInDibao,
			int isInYibao, int isInYanglao, int isDisable, String memo) {
		super();
		this.username = username;
		this.gender = gender;
		this.education = education;
		this.identityCard = identityCard;
		this.workstatus = workstatus;
		this.isHuzhu = isHuzhu;
		this.isInDibao = isInDibao;
		this.isInYibao = isInYibao;
		this.isInYanglao = isInYanglao;
		this.isDisable = isDisable;
		this.memo = memo;
	}
	
	
	

}
